package jjn.acwing.java_basic;

import java.util.Scanner;

/**
 * @author Jiang Jining
 * @since 2023-09-11 23:04
 */
public class Acwing812 {
    private static void print(int[] a, int size) {
        for (int i = 0; i < size; i++) {
            System.out.printf("%d ", a[i]);
        }
        System.out.println();
    }
    
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            int size = sc.nextInt();
            int[] a = new int[n];
            for (int i = 0; i < size; i++) {
                a[i] = sc.nextInt();
            }
            print(a, size);
        }
    }
}
